//
// Created by Administrator on 2021/11/23.
// May Saint Diana bless you!
//
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <climits>

using namespace std;

class Solution {
public:
    bool makeEqual(vector<string> &words) {
        // 统计char总数
        int n = words.size();
        vector<int> counter(26, 0);
        for (const string &word: words) {
            for (const char &c: word) {
                ++counter[c - 'a'];
            }
        }
        return all_of(counter.begin(), counter.end(), [n](int x) { return x % n == 0; });
    }
};

int main() {
    Solution solution;
    vector<string> v{"abc", "aabc", "bc"};
    cout << solution.makeEqual(v) << endl;
    return 0;
}
